package es;


import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 大数据查询专利 服务
 *
 * @author you.wu
 */
@Component("bigdataIndexClient")
//@FeignClient(name = "ips-escommon-patentindex", url = "${base.wzdata.url}",
//        fallback = BigdataIndexClient.DefaultFallback.class
//)
public interface BigdataIndexClient {

    /**
     * 通用查询接口
     *
     * @param param 入参
     * @return {@link EsCommonResult}
     */
    @PostMapping("/escommon/search/admin")
    EsCommonResult search(@RequestBody EsCommonParam param);

    @Component
    @Slf4j
    class DefaultFallback implements BigdataIndexClient {

        @Override
        public EsCommonResult search(EsCommonParam param) {
            return null;
        }
    }
}
